package com.miracle9.game.dao;

import com.miracle9.game.bean.Pager;
import com.miracle9.game.entity.DragonTigerDeskResult;
import org.springframework.stereotype.Repository;

@Repository
public class DragonTigerDeskResultServiceDao extends SqlOperating<DragonTigerDeskResult, Integer> {

    public Pager getByDeskIdAndInterval(int id, String startDate, String endDate, Pager pager) {
        return q_CreateSqlsPager("from DragonTigerDeskResult where deskId = ? and datetime>=? and datetime<?", pager, new Object[]{Integer.valueOf(id),
                startDate, endDate});
    }

    public void deletePastResult(String date) {
        q_CreateSql("delete from DragonTigerDeskResult where datetime<?", new Object[]{date}).executeUpdate();
    }

}
